package com.controller;


<<<<<<< HEAD
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.entity.UsersCompany;
import com.entity.UsersPersonal;
import com.mapper.UsersPersonalDao;
import com.service.UsersCompanyService;
import com.service.UsersPersonalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.thymeleaf.util.StringUtils;
=======
import com.entity.UsersCompany;
import com.entity.UsersPersonal;
import com.service.UsersCompanyService;
import com.service.UsersPersonalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
>>>>>>> 784072f6c3135fcc1cd41893f32c7972e4abb8b2

import java.util.List;

/**
 * <p>
 * 个人信息表  前端控制器
 * </p>
 *
 * @author Damon
 * @since 2021-04-26
 */
@RestController
@RequestMapping("/users-personal")
<<<<<<< HEAD
@Api(value = "UsersController", tags = {"个人/专家用户接口"})
public class UsersPersonalController {
    @Autowired
    private UsersPersonalService usersPersonalService;

    @RequestMapping("/listAll")
    @ApiOperation(value = "查询专家个人信息listAll", notes = "查询专家个人信息", httpMethod = "POST")
    public List<UsersPersonal> listAll(){
=======
public class UsersPersonalController {
    @Autowired
    private UsersPersonalService usersPersonalService;
    @RequestMapping("/listAll")
    public List<UsersPersonal>listAll(){
>>>>>>> 784072f6c3135fcc1cd41893f32c7972e4abb8b2
        List<UsersPersonal> list = usersPersonalService.list();
        return list;
    }

<<<<<<< HEAD
    @GetMapping("/list")
    @ApiOperation(value = "根据账户查询专家个人信息list", notes = "查询专家个人信息", httpMethod = "GET")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "user_account", value = "用户账户名", required = true, dataType = "string"),
    })
    public List<UsersPersonal> list(String user_account){
        QueryWrapper<UsersPersonal> sql = new QueryWrapper<UsersPersonal>();
        sql.lambda()
                .like(!StringUtils.isEmpty(user_account),UsersPersonal::getUserAccount,user_account);
        List<UsersPersonal> list = this.usersPersonalService.list(sql);
        return list;
    }

    @PostMapping("/update")
    @ApiOperation(value = "修改专家个人信息update", notes = "修改专家个人信息", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "用户账户名", required = true, dataType = "string"),
    })
    public boolean edit(@RequestBody UsersPersonal usersPersonal){
            return usersPersonalService.updateById(usersPersonal) ;
    }



=======
>>>>>>> 784072f6c3135fcc1cd41893f32c7972e4abb8b2
}

